/*
 * JSMin
 * Javascript Compressor
 * http://www.crockford.com/
 * http://www.smallsharptools.com/
*/

var GGcache_overflowVal;var GGscreenCache=false;function putScreenCache(domObjToCache,classCss)
{GGcache_overflowVal=$("body").css("overflow");$("body").css("overflow","hidden");var iframeTmp=document.createElement("iframe");iframeTmp.frameBorder="no";iframeTmp.scrolling="no";iframeTmp.src="about:blank";iframeTmp.id='iframecache';iframeTmp.style.display="none";iframeTmp.style.height=getClientHeight().toString()+"px";iframeTmp.style.width=getClientWidth().toString()+"px";iframeTmp.style.top=$(window).scrollTop().toString()+"px";iframeTmp.style.left=$(window).scrollLeft().toString()+"px";if(domObjToCache)
$(domObjToCache).before(iframeTmp);else
$("body").prepend(iframeTmp);var cache=document.createElement("div");cache.innerHTML="&nbsp;";cache.id='screencache';cache.style.display="none";cache.style.height=getClientHeight().toString()+"px";cache.style.width=getClientWidth().toString()+"px";cache.style.top=$(window).scrollTop().toString()+"px";cache.style.left=$(window).scrollLeft().toString()+"px";if(domObjToCache)
$(domObjToCache).before(cache);else
$("body").prepend(cache);$(cache).css("opacity","0.75");$(cache).css("display","");$(iframeTmp).css("opacity","0.1");$(iframeTmp).css("display","");GGscreenCache=true;addEventOnResize(function(){resizeScreenCache();},1,"ScreenCache");}
function resizeScreenCache()
{var cache=$("#screencache");cache.css("height",getClientHeight().toString()+"px");cache.css("width",getClientWidth().toString()+"px");cache.css("top",$(window).scrollTop().toString()+"px");cache.css("left",$(window).scrollLeft().toString()+"px");var iframeCache=$("#iframecache");iframeCache.css("height",getClientHeight().toString()+"px");iframeCache.css("width",getClientWidth().toString()+"px");iframeCache.css("top",$(window).scrollTop().toString()+"px");iframeCache.css("left",$(window).scrollLeft().toString()+"px");}
function removeScreenCache()
{$("#iframecache").remove();$("#screencache").remove();$("body").css("overflow",GGcache_overflowVal);removeEventOnResize("ScreenCache");GGscreenCache=false;}
function addIframeUnder(obj,position,display)
{var objIframe=$("#iframe_cache");if(objIframe.length==0)
{var iframeTmp=document.createElement("iframe");iframeTmp.frameBorder="no";iframeTmp.scrolling="no";iframeTmp.src="about:blank";iframeTmp.id="iframe_cache";iframeTmp.className="iframe_cache";iframeTmp.style.display=display||"none";objIframe=$(iframeTmp);}
if(position=="absolute")
{objIframe.css("left",obj.css("left"));objIframe.css("top",obj.css("top"));objIframe.css("marginLeft",0);objIframe.css("marginTop",0);}
else
{objIframe.css("left",0);objIframe.css("top",0);objIframe.css("marginLeft",obj.css("marginLeft"));objIframe.css("marginTop",obj.css("marginTop"));}
objIframe.height(obj.outerHeight());objIframe.width(obj.outerWidth());obj.after(objIframe);if(display)objIframe.css("display",display);return objIframe;}
function hideIframeUnder()
{$("#iframe_cache").css("display","none");}
jQuery.fn.extend({ImageRotate:function(parameters)
{if(this.GUIPhoto&&this.GUIPhoto.PhotoEffect)return;return(new GUIPhoto.PhotoEffect(this,parameters))._temp;},rotate:function(parameters)
{if(typeof parameters=="undefined")return;if(typeof parameters=="number")parameters={angle:parameters};if(typeof this.get(0).GUIPhoto=="undefined")
return $(this.ImageRotate(parameters));else
{this.get(0).GUIPhoto.PhotoEffect._rotate(parameters);}}});GUIPhoto={};GUIPhoto.PhotoEffect=function(img,parameters)
{img=img.get(0);this._IEfix=img;this._parameters=parameters;this._parameters.className=img.className;this._parameters.id=img.getAttribute('id');if(!parameters)this._parameters={};this._angle=0;if(!parameters.angle)this._parameters.angle=0;this._temp=document.createElement('span');this._temp.GUIPhoto={PhotoEffect:this};var image=img.src;img.parentNode.insertBefore(this._temp,img);this._img=new Image();this._img.src=image;this._img._ref=this;jQuery(this._img).bind("load",function()
{this._ref._Loader.call(this._ref);});if(jQuery.browser.msie)if(this._img.complete)this._Loader();}
GUIPhoto.PhotoEffect.prototype._Loader=function()
{this._IEfix.parentNode.removeChild(this._IEfix);this._temp.setAttribute('id',this._parameters.id);this._temp.className=this._parameters.className;var width=this._img.width;var height=this._img.height;this._img._widthMax=this._img._heightMax=Math.sqrt((height)*(height)+(width)*(width));this._canvas=document.createElement('canvas');this._canvas._ref=this;this._canvas.height=width;this._canvas.width=height;this._canvas.setAttribute('width',width);this._temp.appendChild(this._canvas);if(jQuery.browser.msie)
{this._canvas.id="GUIPhoto.PhotoTemp";G_vmlCanvasManager.initElement(this._canvas);this._canvas=document.getElementById('GUIPhoto.PhotoTemp');this._canvas.id="";this._canvas._ref=this;}
var self=this;this._parameters.animateAngle=0;if(this._parameters.bind)
{for(var a in this._parameters.bind)if(this._parameters.bind.hasOwnProperty(a))
for(var b in this._parameters.bind[a])if(this._parameters.bind[a].hasOwnProperty(b))
jQuery(this._canvas).bind(b,this._parameters.bind[a][b]);}
this._cnv=this._canvas.getContext('2d');this._rotate(this._parameters);}
GUIPhoto.PhotoEffect.prototype._rotate=function(parameters)
{var angle=parameters.angle||0;var offsetShadow=parameters.offsetShadow||5;var opacityShadow=parameters.opacityShadow||0.5;var tailleBordure=parameters.tailleBordure||5;var radius=parameters.radius||6;if(!this._img.width)return;if(typeof angle!="number")return;angle=(angle%360)*Math.PI/180;var width=this._img.width;var height=this._img.height;var widthCadre=width+(tailleBordure*2);var heightCadre=height+(tailleBordure*2);var widthAdd=this._img._widthMax-width;var heightAdd=this._img._heightMax-height;this._canvas.width=width+widthAdd+offsetShadow+(tailleBordure*2)+radius;this._canvas.height=height+heightAdd+offsetShadow+(tailleBordure*2)+radius;this._cnv.translate(widthAdd/2,heightAdd/2);this._cnv.translate(width/2,height/2);this._cnv.rotate(angle);this._cnv.translate(-width/2,-height/2);this._shadow(widthCadre,heightCadre,radius,offsetShadow,'rgba(0, 0, 0, '+opacityShadow+')');this._cnv.fillStyle='#FFF';this._cnv.fillRect(0,0,width+(tailleBordure*2),height+(tailleBordure*2));this._shadow(0,0,0,0,"transparent");this._cnv.drawImage(this._img,tailleBordure,tailleBordure);if(parameters.callback)
parameters.callback();}
GUIPhoto.PhotoEffect.prototype._shadow=function(width,height,radius,distance,color)
{this._cnv.shadowOffsetX=distance;this._cnv.shadowOffsetY=distance;this._cnv.shadowBlur=radius;this._cnv.shadowColor=color;}
GUIPhoto.PhotoEffect.prototype._shadowMano=function(width,height,radius,distance,opacity)
{var unite=1;var start=2;var sortie="";for(var i=start;i<=radius;i=i+2)
{for(var j=start;j<=radius;j=j+2)
{if(i!=j)
{sortie+=i+' '+j+"\n";this._shadowLayer(distance-(i*unite)+radius,distance-(j*unite)+radius,width+(2*i*unite)-radius,height+(2*j*unite)-radius,(opacity/(radius)));}}}}
GUIPhoto.PhotoEffect.prototype._shadowLayer=function(x,y,width,height,opacityLayer)
{this._cnv.fillStyle='rgba(0,0,0,'+opacityLayer+')';this._cnv.fillRect(x,y,width,height);this._cnv.clearRect(x,y,1,1);this._cnv.clearRect(x+width-1,y,1,1);this._cnv.clearRect(x,y+height-1,1,1);this._cnv.clearRect(x+width-1,y+height-1,1,1);}
jQuery.fn.date=function(attributes)
{if(!attributes)
{attributes={};}
attributes.culture=attributes.culture||"FR";attributes.callbackErrorFormat=typeof attributes.callbackErrorFormat=="function"?attributes.callbackErrorFormat:function(){};attributes.callbackNoError=typeof attributes.callbackNoError=="function"?attributes.callbackNoError:function(){};this.keypress(function(e)
{var key=e.charCode?e.charCode:e.keyCode?e.keyCode:0;if(key==13&&this.nodeName.toLowerCase()=="input")
{return true;}
else if(key==13)
{return false;}
var allow=false;if((e.ctrlKey&&key==97)||(e.ctrlKey&&key==65)){return true;}
if((e.ctrlKey&&key==120)||(e.ctrlKey&&key==88)){return true;}
if((e.ctrlKey&&key==99)||(e.ctrlKey&&key==67)){return true;}
if((e.ctrlKey&&key==122)||(e.ctrlKey&&key==90)){return true;}
if((e.ctrlKey&&key==118)||(e.ctrlKey&&key==86)||(e.shiftKey&&key==45)){return true;}
if(key<48||key>57)
{if((key==47&&this.value.length==2)||(key==47&&this.value.length==5)){return true;}
if(key!=8&&key!=9&&key!=13&&key!=35&&key!=36&&key!=37&&key!=39&&key!=46)
{allow=false;}
else
{if(typeof e.charCode!="undefined")
{if(e.keyCode==e.which&&e.which!=0)
{allow=true;}
else if(e.keyCode!=0&&e.charCode==0&&e.which==0)
{allow=true;}}}}
else
{if((this.value.length==0)||(this.value.length==1)||(this.value.length==3)||(this.value.length==4)||(this.value.length==6)||(this.value.length==7)||(this.value.length==8)||(this.value.length==9))
{allow=true;}}
return allow;}).blur(function()
{var val=jQuery(this).val();if(val!="")
{if(!isDate(val,attributes.culture)||val.length<10)
{attributes.callbackErrorFormat.apply(this,[this]);}
else
{attributes.callbackNoError.apply(this,[this]);}}}).keyup(function()
{var val=jQuery(this).val();if(val!="")
{if(!isDate(val,attributes.culture))
{attributes.callbackErrorFormat.apply(this,[this]);}
else
{attributes.callbackNoError.apply(this,[this]);}}});return this;};var dtCh="/";function daysInFebruary(year){return(((year%4==0)&&((!(year%100==0))||(year%400==0)))?29:28);}
function DaysArray(n){for(var i=1;i<=n;i++){this[i]=31;if(i==4||i==6||i==9||i==11)
{this[i]=30;}
if(i==2)
{this[i]=29;}}
return this;}
function isDate(dtStr,culture)
{var daysInMonth=DaysArray(12);if(dtStr.length==10)
{var strDay;var strMonth;var pos1=dtStr.indexOf(dtCh);var pos2=dtStr.indexOf(dtCh,pos1+1);if(culture&&culture.toUpperCase()=="FR")
{strDay=dtStr.substring(0,pos1);strMonth=dtStr.substring(pos1+1,pos2);}
else
{strMonth=dtStr.substring(0,pos1);strDay=dtStr.substring(pos1+1,pos2);}
var strYear=dtStr.substring(pos2+1);strYr=strYear;if(strDay.charAt(0)=="0"&&strDay.length>1)
{strDay=strDay.substring(1);}
if(strMonth.charAt(0)=="0"&&strMonth.length>1)
{strMonth=strMonth.substring(1);}
for(var i=1;i<=3;i++)
{if(strYr.charAt(0)=="0"&&strYr.length>1)
{strYr=strYr.substring(1);}}
month=parseInt(strMonth);day=parseInt(strDay);year=parseInt(strYr);if(strMonth&&(month<1||month>12))
{return false;}
if(strDay&&(day<1||day>31||(month==2&&day>daysInFebruary(year))||day>daysInMonth[month]))
{return false;}}
return true;}
jQuery.fn.numeric=function(attributes)
{noMoreBackspace();if(!attributes)
{attributes={};}
attributes.decimal=attributes.decimal||".";if(this.val())
{this.val(replaceStr(this.val(),",",attributes.decimal));}
attributes.callbackErrorFormat=typeof attributes.callbackErrorFormat=="function"?attributes.callbackErrorFormat:function(){};attributes.callbackErrorInterval=typeof attributes.callbackErrorInterval=="function"?attributes.callbackErrorInterval:function(){};attributes.callbackNoError=typeof attributes.callbackNoError=="function"?attributes.callbackNoError:function(){};this.keypress(function(e)
{var key=e.charCode?e.charCode:e.keyCode?e.keyCode:0;if(key==13&&this.nodeName.toLowerCase()=="input")
{return true;}
else if(key==13)
{return false;}
var allow=false;if((e.ctrlKey&&key==97)||(e.ctrlKey&&key==65)){return true;}
if((e.ctrlKey&&key==120)||(e.ctrlKey&&key==88)){return true;}
if((e.ctrlKey&&key==99)||(e.ctrlKey&&key==67)){return true;}
if((e.ctrlKey&&key==122)||(e.ctrlKey&&key==90)){return true;}
if((e.ctrlKey&&key==118)||(e.ctrlKey&&key==86)||(e.shiftKey&&key==45)){return false;}
if(key<48||key>57)
{if(key==45&&attributes.allowNegative&&this.value.indexOf("-")==-1){return true;}
if((key==attributes.decimal.charCodeAt(0)&&this.value.indexOf(attributes.decimal)!=-1)||attributes.decimal=='no')
{allow=false;}
if(key!=8&&key!=9&&key!=13&&key!=35&&key!=36&&key!=37&&key!=46)
{allow=false;}
else
{if(typeof e.charCode!="undefined")
{if(e.keyCode==e.which&&e.which!=0)
{allow=true;}
else if(e.keyCode!=0&&e.charCode==0&&e.which==0)
{allow=true;}}}
if(key==attributes.decimal.charCodeAt(0)&&this.value.indexOf(attributes.decimal)==-1)
{allow=true;}}
else
{allow=true;}
return allow;});this.blur(function()
{var val=jQuery(this).val();if(val!="")
{var re=new RegExp("^\\d+$|\\d*"+attributes.decimal+"\\d+");var testCastOK=true;var resultCast;try{resultCast=Number($.trim(val));}
catch(e)
{testCastOK=false;attributes.callbackErrorFormat.apply(this,[this]);}
if(testCastOK&&!isNaN(resultCast)&&!re.exec(val))
{attributes.callbackErrorFormat.apply(this,[this]);}
else
{attributes.callbackNoError(this,[this]);}}});this.keyup(function()
{var regExpStr="[^0123456789.]";var filter=new RegExp(regExpStr,"g");var mnt;if(attributes.allowNegative&&jQuery(this).val().length>0&&jQuery(this).val().indexOf("-")==0)
{mnt="-"+jQuery(this).val().substr(1).replace(filter,"");}
else
{mnt=jQuery(this).val().replace(filter,"");}
if(mnt!=jQuery(this).val())
{jQuery(this).val(mnt).trigger("change");}
if(((attributes.minValue||attributes.minValue==0)&&num<attributes.minValue)||((attributes.maxValue||attributes.maxValue==0)&&num>attributes.maxValue))
{attributes.callbackErrorInterval.apply(this,[this]);}
else
{attributes.callbackNoError(this,[this]);}});return this;};function getMsgPasteTooManyRows(){return"Too many rows";}
function getMsgWarningPaste(){return"Errors while pasting data";}
function getMsgPasteTooManyCols(){return"Too many columns";}
function getMsgLine(){return"Line";}
jQuery.fn.paste_xls=function()
{this.bind("paste",function(e)
{var dataXls=window.clipboardData.getData('Text');var warningMsg=getMsgWarningPaste();var hasWarnings=false;if(dataXls)
{var data=dataXls.split("\n");var decoup;var i;for(i=0;i<data.length;i++)
{decoup=data[i].split("\t");if(decoup.length==1)
{decoup=decoup[0].split(";");}
data[i]=decoup;}
if(data[data.length-1].length==1&&!data[data.length-1][0])
{data.splice(data.length-1,1);}
var row;var col;var tr=$(this).parents("tr").eq(0);var td=$(this).parents("td").eq(0);var input=$(this);var firstRow=true;var firstCol=true;var mnt;var formatMnt;var posVirg;var filter=new RegExp("[^0123456789.]","g");rows_loop:for(var rowIndex=0;rowIndex<data.length;rowIndex++)
{row=data[rowIndex];if(!firstRow)
{tr=tr.nextAll("tr:visible").eq(0);if(tr.length==0)
{warningMsg+=" - "+getMsgPasteTooManyRows();hasWarnings=true;break rows_loop;}
td=$("td",tr).eq(0);}
cols_loop:for(var colIndex=0;colIndex<row.length;colIndex++)
{col=row[colIndex];if(!firstCol)
{td=td.nextAll("td").eq(0);input=$("input:visible",td).eq(0);}
else
{if(!firstRow)
{input=$("input:visible",tr).eq(0);td=input.parents("td").eq(0);}}
if(td.length==0)
{warningMsg+=" - "+getMsgPasteTooManyCols()+" ("+getMsgLine()+" "+(rowIndex+1).toString()+")<br>";hasWarnings=true;break cols_loop;}
mnt="";formatMnt="fr";posVirg=col.indexOf(",");if(posVirg!=-1&&col.indexOf(".")!=-1)
{formatMnt="en";}
if(posVirg!=-1&&col.indexOf(",",posVirg+1)!=-1)
{formatMnt="en";}
switch(formatMnt)
{case"fr":mnt=replaceStr(replaceStr(col," ",""),",",".");break;case"en":mnt=replaceStr(col,",","");break;}
mnt=mnt.replace(filter,"");input.val(mnt);firstCol=false;}
firstRow=false;firstCol=true;}}
if(hasWarnings)
{warning(this,warningMsg);}
else
{warning(this,'');}
return false;});return this;};function Message(text,type)
{var copy=text.replace(new RegExp(/_br_/g),"<br>");this.text=copy;this.type=type;this.toHTML=Message_toHTML;}
function Message_toHTML()
{switch(this.type)
{case"E":case"e":return"<div class='tooltip message_error'><img src='images/exclamation.png' class='imgTooltip'><div style='float:right;clear:both;'>"+this.text+"</div></div>";break;case"W":case"w":return"<div class='tooltip message_warning'><img src='images/exclamation.png' class='imgTooltip'><div style='float:right;clear:both;'>"+this.text+"</div></div>";break;case"L":case"l":return"<div class='tooltip message_info'><img src='images/tooltiploading.gif' class='imgTooltip'><div style='float:right;clear:both;'>"+this.text+"</div></div>";break;case"V":case"v":case"I":case"i":return"<div class='tooltip message_info'><img src='images/information.png' class='imgTooltip'><div style='float:right;clear:both;'>"+this.text+"</div></div>";break;default:return"";break;}}
function DisplayMessage(text,type,idMessage)
{var messageObj=new Message(text,type);idMessage=idMessage||" ";showMessage(messageObj);}
function showMessage(messageObj)
{var divMessage=$("#divMessagePage"+messageObj.type.toUpperCase());var divTexte=$(".texte_message",divMessage);divTexte.html(messageObj.text);divMessage.css("visibility","hidden").css("display","");if(divTexte.height()>50)
{divTexte.css("height","50px");}
divMessage.css("visibility","visible").css("display","none");if(messageObj.type.toUpperCase()=="B")
{putScreenCache("message");}
setTimeout("$(\"#divMessagePage"+messageObj.type.toUpperCase()+"\").fadeIn(400,function(){execOnResizeEvents();})",500);if(messageObj.type.toUpperCase()!="E"&&messageObj.type.toUpperCase()!="W")
{setTimeout(function(){hideMessage();},5000);}}
function hideMessage()
{$(".divMessagePage:visible").fadeOut(500,function(){afterFadeOutMessage();});}
function afterFadeOutMessage()
{removeScreenCache("message_modal");var divMessage=$(".divMessagePage:visible");var divTexte=$(".texte_message",divMessage);divTexte.html("");divTexte.css("height","");divMessage.css("display","none").css("visibility","visible");execOnResizeEvents();}
function closeModalWinMessage(idMessage)
{cacherModalWin('message_modal');if(document.location.host!="localhost")
{ecrireCookie(nomCookieService,idMessage,"cm.net");}
else
{ecrireCookie(nomCookieService,idMessage);}}
var onResizeEvents=[];onResizeEvent.prototype={};function onResizeEvent(fn,priority,name)
{this.priority=priority;this.fn=fn;this.name=name||"";}
function compareEvents(event1,event2)
{return event1.priority-event2.priority;}
function addEventOnResize(fn,priority,name)
{onResizeEvents.push(new onResizeEvent(fn,priority,name));onResizeEvents.sort(compareEvents);}
function removeEventOnResize(eventName)
{var eventIndex;var found=false;for(eventIndex in onResizeEvents)
{if(onResizeEvents[eventIndex].name==eventName)
{found=true;break;}}
if(found&&eventIndex)
{onResizeEvents.splice(eventIndex,1);}}
function execOnResizeEvents()
{var maxFunctions=onResizeEvents.length;for(var cptFunctions=0;cptFunctions<maxFunctions;cptFunctions++)
{onResizeEvents[cptFunctions].fn();}}
$(document).ready(function(){$(window).resize(function(){execOnResizeEvents();});});
